<#import "/spring.ftl" as spring />
<!doctype html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js"> <!--<![endif]-->
<head>
    <base href="<@spring.url basePath/>">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Eureka</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width">

    <link rel="stylesheet" href="eureka/css/wro.css">

</head>

<body id="one">
<#include "header.ftl">
<div class="container-fluid xd-container">
    <#include "navbar.ftl">
    <h1>Instances currently registered with Eureka</h1>
    <table id='instances' class="table table-striped table-hover">
        <thead>
        <tr>
            <th width="20%">Application</th>
            <th width="20%">Action</th>
            <th width="60%">Status</th>
        </tr>
        </thead>
        <tbody>

        <#if apps?has_content>
            <#list apps as app>
                <tr>
                    <#if app.versionLast>
                        <td><b> ${app.name} ${app.lastVersion!}</b></td>
                    <#else>
                        <td><font color="red"><b>${app.name} ${app.lastVersion!}</b></font></td>
                    </#if>
                    <td>
                        <#list app.actions as action>
                            <a href="${action.url}" target="_blank">${action.name}</a>
                        </#list>
                    </td>
                    <td>
                        <#if app.instances?has_content>
                            <#list app.instances as instance>
                                ${instance.status} - ${instance.instanceId}<br/>
                            </#list>
                        </#if>
                    </td>
                </tr>
            </#list>
        </#if>

        </tbody>
    </table>


</div>
<script type="text/javascript" src="eureka/js/wro.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('table.stripeable tr:odd').addClass('odd');
        $('table.stripeable tr:even').addClass('even');
    });
</script>
</body>
</html>
